package com.yyg.usecase;

import org.springframework.util.CollectionUtils;

import java.util.Collections;
import java.util.Objects;

public class VipService {

    private ServiceProperties serviceProperties;

    public VipService(ServiceProperties serviceProperties) {
        this.serviceProperties = serviceProperties;
    }

    public boolean isVip(String userId) {
        return !CollectionUtils.isEmpty(serviceProperties.getVipUserIds())
                && serviceProperties.getVipUserIds().contains(userId);
    }

}
